

import React,{Component} from 'react';
import PropTypes from 'prop-types';


class TestContext extends Component {

    static contextTypes = {
        setNavConfig: PropTypes.func,
        text:PropTypes.string,
        voteislan:PropTypes.string,
        text: PropTypes.string,
        list: PropTypes.string
    };


    constructor(props,context){
        super(props,context);

        console.log(JSON.stringify(this.context));

    }


    render(){
        return (
            <p>Context的内容：{JSON.stringify(this.context)}</p>
        );
    }


}


export default TestContext;